package com.stone.design.patterns.adapter;

/**
 * @description 对象适配器，适配器持有原系统的对象
 * @Time 2018/4/4 11:07
 * Created by Stone on 2018/4/4.
 */

public class AdapterVolt5Obj implements Volt5 {

    Volt220 volt220;

    public AdapterVolt5Obj(Volt220 volt220) {
        this.volt220 = volt220;
    }

    public int getVolt220() {
        return volt220.getVolt220();
    }

    @Override
    public int getVolt5() {
        return getVolt220() / 44;
    }
}
